﻿using SqlSugar;
using System;

namespace HamcoWcs.Tools.LogCleaner.Entities
{
    [SugarTable("mes_msg_queue")]
    public class MesMsgQueue
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "BIGINT(20)")]
        public long Id { get; set; } = 0;
        [SugarColumn(ColumnDescription = "业务类型", ColumnDataType = "nvarchar(50)")]
        public string BusinessType { get; set; }

        [SugarColumn(ColumnDescription = "发送数据", ColumnDataType = "nvarchar(4096)")]
        public string Content { get; set; }
        public string TransactionId { get; set; }

        [SugarColumn(ColumnDescription = "请求类型")]
        public EnumMesRequestType RequestType { get; set; }

        [SugarColumn(ColumnDescription = "返回的数据", ColumnDataType = "nvarchar(4096)")]
        public string Return { get; set; }

        [SugarColumn(ColumnDescription = "主题", ColumnDataType = "nvarchar(100)")]
        public string EventName { get; set; }

        [SugarColumn(ColumnDescription = "发送方")]
        public EnumMesMsgSender Sender { get; set; }

        [SugarColumn(ColumnDescription = "消息状态")]
        public EnumMesMsgStatus Status { get; set; }
        public DateTime CreatedTime { get; set; }
        public DateTime LastUpdateTime { get; set; }
    }

    //[SugarTable("mes_msg_log")]
    //public class MesMsgQueueBak : MesMsgQueue
    //{
    //    public MesMsgQueueBak()
    //    {

    //    }

    //    public MesMsgQueueBak(MesMsgQueue msg)
    //    {
    //        var pis = GetType().GetProperties();
    //        foreach (var pi in pis)
    //        {
    //            var value = pi.GetValue(msg);
    //            pi.SetValue(this, value);
    //        }
    //    }
    //}
}